package flowshop.Bees;

import java.util.Map;
import java.util.TreeMap;

import flowshop.Solution.Solution;

/**
 * Liczy laczny czas wykonania wszystkich zadan w danym rozwiazaniu
 * @author Konrad Tendera
 *
 */
public class TestClass {
		
	
	
	public static void main(String[] args) {
		int[][] data =  {{18,77,73,91,96,10,58,70,42,21,11,88,91,78,70,53,51,96,27,47,30,37,63,61,73,80,5,82,49,11,79,78,57,47,91,92,94,33,52,12,37,47,39,4,50,90,58,46,14,84,},
				{97,49,33,48,68,36,66,6,54,16,7,35,64,18,8,61,41,65,71,34,35,92,70,65,76,71,81,32,27,95,49,51,65,17,91,23,17,19,28,70,67,40,81,54,52,38,6,8,31,98,},
				{14,17,31,37,85,84,7,54,40,95,97,44,4,46,10,63,76,23,95,73,78,46,40,34,92,42,56,4,63,93,72,63,62,30,91,96,53,19,40,14,16,66,54,54,64,86,31,99,10,2,},
				{74,29,77,14,30,14,48,1,4,71,54,30,42,43,33,32,12,68,8,82,27,59,20,60,76,44,29,68,24,46,94,79,68,49,85,87,17,99,76,81,52,24,57,8,36,67,57,66,5,69,},
				{75,43,70,11,64,88,94,9,29,58,90,78,63,34,71,49,69,97,10,43,22,16,31,22,62,14,11,46,85,59,73,22,70,52,70,45,45,37,2,90,2,40,70,93,44,71,83,13,3,99,},
				{27,98,62,17,35,71,94,58,77,29,61,41,47,2,16,41,59,27,18,33,1,99,3,15,45,82,20,11,90,65,73,71,26,97,50,43,7,78,27,50,70,65,96,27,66,18,96,66,82,23,},
				{69,28,95,38,89,19,6,52,70,4,81,1,36,30,13,90,30,66,28,36,38,48,97,56,92,93,81,24,38,39,33,7,75,43,92,44,35,2,96,28,13,67,61,71,20,54,53,75,58,74,},
				{65,21,60,72,4,85,47,80,71,26,73,36,38,13,66,82,2,76,29,90,36,32,84,78,94,45,14,72,3,18,58,87,30,73,71,5,77,60,6,61,23,29,2,67,69,38,37,80,51,34,},
				{89,41,16,7,84,53,56,71,40,17,33,3,51,76,2,63,84,55,3,82,46,58,24,57,59,86,39,55,69,36,98,82,44,70,67,74,61,38,87,35,37,98,26,49,12,52,49,92,43,75,},
				{83,3,99,87,60,92,75,53,30,59,95,85,63,21,78,72,87,52,39,93,22,82,21,65,81,59,73,74,33,53,47,69,11,31,69,67,3,21,29,28,45,2,53,36,5,79,76,32,87,4}};
		
		Map<String, String> params = new TreeMap<String, String>();
		
		params.put("cycleCount", "65536"); 
		params.put("foodSourcesNumber", "8192"); 
		params.put("onlookerBeesNumber", "4096"); 
		params.put("scoutBeesCount", "2048"); 
		params.put("mutateMode", "4"); 
		params.put("ifLocalSearch", "0"); 
		params.put("scoutMode", "0"); 
		
		BeeColony bee = new BeeColony(data, new ResultListener(), params);
		Solution sol = bee.optimize();
		int[] res = sol.getSolution();
		for (int i = 0; i<res.length;i++){
			System.out.print(res[i]+" ");
		}
		System.out.println();
		System.out.print(sol.getEval());

		/*
		//na schedulerze
		BeeScheduler bee = new BeeScheduler(data, new ResultListener(), params);
		bee.start();
		 */
	}
	
	
	
}

